home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / sources / gauge / project.c < prev    next >
C/C++ Source or Header  |  2004-08-03  |  3KB  |  118 lines

  1. ;/*
  2.    F_Create.rexx LIB Feelin:LIBS/Feelin/Gauge.fc 3 0
  3.    QUIT
  4.    ________________________________________________________________________
  5.  
  6. ** (03.00) 2004/01/04
  7.  
  8.    Preference editor support.
  9.  
  10.    Supports FA_AreaData.
  11.  
  12. */
  13.  
  14. #include "Private.h"
  15.  
  16. struct FeelinBase                  *FeelinBase;
  17.  
  18. ///METHODS
  19. F_METHOD(void,Gauge_New);
  20. F_METHOD(void,Gauge_Set);
  21. F_METHOD(void,Gauge_Get);
  22. F_METHOD(void,Gauge_AskMinMax);
  23. F_METHOD(void,Gauge_Draw);
  24.  
  25. /*** Preferences ***/
  26.  
  27. F_METHOD(void,p_Gauge_New);
  28. F_METHOD(void,p_Gauge_Show);
  29. F_METHOD(void,p_Gauge_Hide);
  30. F_METHOD(void,p_Gauge_Load);
  31. F_METHOD(void,p_Gauge_Save);
  32. F_METHOD(void,p_Gauge_Update);
  33. //+
  34.  
  35. F_QUERY()
  36. {
  37.    FeelinBase = Feelin;
  38.  
  39.    switch (Which)
  40.    {
  41. ///Query_ClassTags
  42.       case FV_Query_ClassTags:
  43.       {
  44.          static struct FeelinDynamicEntry Attributes[] =
  45.          {
  46.             "Simple",0, "Info",0, NULL
  47.          };
  48.  
  49.          static struct FeelinDynamicEntry Resolve[] =
  50.          {
  51.             "FA_Numeric_Value",0, "FA_Numeric_Min",0, "FA_Numeric_Max",0, NULL
  52.          };
  53.  
  54.          static struct FeelinMethodEntry Handlers[] =
  55.          {
  56.             (FMethod) Gauge_New,        NULL, FM_New,
  57.             (FMethod) Gauge_Get,        NULL, FM_Get,
  58.             (FMethod) Gauge_Set,        NULL, FM_Set,
  59.             (FMethod) Gauge_AskMinMax,  NULL, FM_AskMinMax,
  60.             (FMethod) Gauge_Draw,       NULL, FM_Draw,
  61.              NULL
  62.          };
  63.  
  64.          static struct TagItem Tags[] =
  65.          {
  66.             FA_Class_Super,         (ULONG) FC_Numeric,
  67.             FA_Class_LODSize,       (ULONG) sizeof (struct LocalObjectData),
  68.             FA_Class_Attributes,    (ULONG) Attributes,
  69.             FA_Class_MethodsTable,  (ULONG) Handlers,
  70.             FA_Class_ResolveTable,  (ULONG) Resolve,
  71.  
  72.             TAG_DONE
  73.          };
  74.  
  75.          return Tags;
  76.       }
  77. //+
  78. ///Query_PrefsTags
  79.       case FV_Query_PrefsTags:
  80.       {
  81.          static struct FeelinDynamicEntry Auto[] =
  82.          {
  83.             "FA_Numeric_Min", 0,
  84.             "FA_Numeric_Max", 0,
  85.             "FM_Numeric_Increase", 0,
  86.              NULL
  87.          };
  88.  
  89.          static struct FeelinMethodEntry Handlers[] =
  90.          {
  91.             (FMethod) p_Gauge_New,   NULL, FM_New,
  92.             (FMethod) p_Gauge_Show,  NULL, FM_Show,
  93.             (FMethod) p_Gauge_Hide,  NULL, FM_Hide,
  94.  
  95.             (FMethod) p_Gauge_Load,  "FM_PreferenceGroup_Load", 0,
  96.             (FMethod) p_Gauge_Save,  "FM_PreferenceGroup_Save", 0,
  97.  
  98.             (FMethod) p_Gauge_Update,  NULL, FM_Gauge_Update,
  99.  
  100.              NULL
  101.          };
  102.  
  103.          static struct TagItem Tags[] =
  104.          {
  105.             FA_Class_Super,            (ULONG) FC_PreferenceGroup,
  106.             FA_Class_LODSize,          (ULONG) sizeof (struct p_LocalObjectData),
  107.             FA_Class_MethodsTable,     (ULONG) Handlers,
  108.             FA_Class_AutoResolveTable, (ULONG) Auto,
  109.          };
  110.  
  111.          return Tags;
  112.       }
  113. //+
  114.    }
  115.    return NULL;
  116. }
  117.  
  118.